package guiClasses;

import javax.swing.JPanel;
import java.awt.GridBagLayout;
import javax.swing.JButton;
import java.awt.GridBagConstraints;
import javax.swing.JTextField;
import java.awt.Insets;
import javax.swing.JComboBox;
import javax.swing.JList;

import objectClasses.Database;
import javax.swing.JTextArea;
import javax.swing.JLabel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Color;
import javax.swing.UIManager;
import javax.swing.border.BevelBorder;

public class PaulEntryPanel extends JPanel {

	/**
	 * Create the panel.
	 */
	public PaulEntryPanel() {
		setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
		setBackground(new Color(153, 153, 102));
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
		gridBagLayout.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
		gridBagLayout.columnWeights = new double[]{0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		setLayout(gridBagLayout);
		
		JLabel lblSelectCategory = new JLabel("Select Category:");
		lblSelectCategory.setBackground(new Color(0, 0, 0));
		GridBagConstraints gbc_lblSelectCategory = new GridBagConstraints();
		gbc_lblSelectCategory.insets = new Insets(0, 0, 5, 5);
		gbc_lblSelectCategory.gridx = 2;
		gbc_lblSelectCategory.gridy = 2;
		add(lblSelectCategory, gbc_lblSelectCategory);
		
		JList list = new JList(Database.getCategoryStrings());
		GridBagConstraints gbc_list = new GridBagConstraints();
		gbc_list.insets = new Insets(0, 0, 5, 5);
		gbc_list.fill = GridBagConstraints.BOTH;
		gbc_list.gridx = 2;
		gbc_list.gridy = 3;
		add(list, gbc_list);
		
		JButton btnBuildDraft = new JButton("Build Draft");
		btnBuildDraft.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		
		JTextArea txtrTellUsAbout = new JTextArea();
		txtrTellUsAbout.setText("Tell us about your materials");
		GridBagConstraints gbc_txtrTellUsAbout = new GridBagConstraints();
		gbc_txtrTellUsAbout.gridheight = 6;
		gbc_txtrTellUsAbout.gridwidth = 7;
		gbc_txtrTellUsAbout.insets = new Insets(0, 0, 5, 0);
		gbc_txtrTellUsAbout.fill = GridBagConstraints.BOTH;
		gbc_txtrTellUsAbout.gridx = 8;
		gbc_txtrTellUsAbout.gridy = 3;
		add(txtrTellUsAbout, gbc_txtrTellUsAbout);
		GridBagConstraints gbc_btnBuildDraft = new GridBagConstraints();
		gbc_btnBuildDraft.insets = new Insets(0, 0, 5, 5);
		gbc_btnBuildDraft.gridx = 2;
		gbc_btnBuildDraft.gridy = 6;
		add(btnBuildDraft, gbc_btnBuildDraft);
		
		JPanel panel = new JPanel();
		GridBagConstraints gbc_panel = new GridBagConstraints();
		gbc_panel.gridwidth = 3;
		gbc_panel.gridheight = 6;
		gbc_panel.insets = new Insets(0, 0, 5, 5);
		gbc_panel.fill = GridBagConstraints.BOTH;
		gbc_panel.gridx = 1;
		gbc_panel.gridy = 8;
		add(panel, gbc_panel);
		
		JLabel lblDraftImage = new JLabel("Draft Image");
		panel.add(lblDraftImage);
		
		JButton btnSubmit = new JButton("Submit");
		GridBagConstraints gbc_btnSubmit = new GridBagConstraints();
		gbc_btnSubmit.insets = new Insets(0, 0, 5, 5);
		gbc_btnSubmit.gridx = 7;
		gbc_btnSubmit.gridy = 12;
		add(btnSubmit, gbc_btnSubmit);

	}

}
